#version 460
#extension GL_GOOGLE_include_directive : enable
#extension GL_EXT_nonuniform_qualifier : enable
#extension GL_EXT_shader_explicit_arithmetic_types_int64 : require
#extension GL_EXT_shader_explicit_arithmetic_types_int16 : require
#extension GL_EXT_shader_explicit_arithmetic_types_int8 : require


#include "../../../../core/shader_binding_ID.h"
#include "../../../../core/shader_std.h"
#include "../../../../core/shader_built_in_functions.h"



layout(location=0) out vec4 outColor;

//layout(early_fragment_tests) in;


layout(location = 0) in vec4 inColor;
layout(location = 1) in vec3 inNormal;
layout(location = 2) in vec3 inViewLine;
layout(location = 3) in flat uint inShaderType;


//const vec3 w = vec3(0.2125,0.7154,0.0721);

void main(void) {
	switch(inShaderType) {
		case DEF_3DShaderType_FronWeight : {
			float d = max(0, dot(inViewLine, inNormal) + 0.03);
			outColor.rgb = inColor.rgb;
			outColor.a = d * 100;
			break;
		}
		default:{
			outColor = inColor;
		}
	}
}


